package org.example.dao.impl;

import org.example.dao.SchedulesDao;
import org.example.domain.Schedules;
import org.example.domain.Student;
import org.example.mapper.SchedulesMapper;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Component
public class SchedulesDaoImpl implements SchedulesDao {
    @Resource
    private SchedulesMapper schedulesMapper;

    @Transactional(rollbackFor = Exception.class, propagation = Propagation.NOT_SUPPORTED)
    @Override
    public int updateByPrimaryKey(Schedules schedules) {
        return schedulesMapper.updateByPrimaryKey(schedules);
    }

    @Override
    public int updateByPrimaryKeySelective(Schedules schedules) {
        return schedulesMapper.updateByPrimaryKeySelective(schedules);
    }
}
